package com.roc.web.action.windcontroll;

import java.util.ArrayList;
import java.util.List;

import com.roc.page.BaseSearchCondition;
import com.roc.page.WhereHQLFieldBean;
import com.roc.util.Constance;

public class StopListSearchCondition extends BaseSearchCondition {

	 /**
	  * @Fields serialVersionUID : TODO
	  */
	    
	private static final long serialVersionUID = 1L;
	private String status;//状态    0 法人身份证 1 营业执照  2 结算卡号 3 非法人身份证
	private String blackNum;//卡号或商户号
	private String blackType;//类型 M商户 C卡
	@Override
	protected List<WhereHQLFieldBean> getWhereHQLFieldBeanList() {
		List<WhereHQLFieldBean> filedBeanList = new ArrayList<WhereHQLFieldBean>();
		if(Constance.isNotEmpty(blackNum))
		{
			filedBeanList.add(new WhereHQLFieldBean("T.MID", blackNum.trim(),"=", false));
		}
		if(Constance.isNotEmpty(status))
		{
			filedBeanList.add(new WhereHQLFieldBean("T.STATUS", status.trim(),"=", false));
		}
		return filedBeanList;
	}

	@Override
	protected String getRowCountHQL() {
		StringBuffer sb=new StringBuffer();
		sb.append(" SELECT COUNT(1) FROM T_MERINFO_STOP  T WHERE 1=1 ");
		return sb.toString();
	}

	@Override
	protected String getSearchHQL() {
		StringBuffer sb=new StringBuffer();
		sb.append(" SELECT T.MID,T.STATUS,T.CREATETIME,T.AGENT_NAME,T.AGENT_ID,T.DETAIL FROM T_MERINFO_STOP T WHERE 1=1 ");
		return sb.toString();
	}

	@Override
	protected String getOrderPartOfHQL() {
		// TODO Auto-generated method stub
		return " ORDER BY CREATETIME DESC ";
	}

	public String getBlackNum() {
		return blackNum;
	}

	public void setBlackNum(String blackNum) {
		this.blackNum = blackNum;
	}

	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}

	public String getBlackType() {
		return blackType;
	}

	public void setBlackType(String blackType) {
		this.blackType = blackType;
	}
	
}
